package com.wit.witmg.api;


import com.wit.witmg.service.ITEAdataService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

/**
 * @author bob
 * @since 2025-03-25
 */
@RestController
@RequestMapping("teadata")
@Api(tags = "老化数据API")
public class TEAdataController {
    @Resource
    private ITEAdataService service;

    @ApiOperation("添加")
    @PostMapping("add")
    public Object add(HttpServletRequest request,
                      @RequestParam("sn") String sn,
                      @RequestParam("table") String table,
                      @RequestBody String json) {
        return service.add(request, sn,table, json);
    }

    @ApiOperation("获取")
    @PostMapping("get")
    public Object get(HttpServletRequest request,
                      @RequestParam("ph") String ph) {
        return service.get(request,ph);
    }

}
